
<div id="foodcollocation-add-edit">

    <div class="title">
        修改食材搭配
    </div>

    <form action="__APP__/FoodCollocation/update" method="post">

        <div class="org">
            <strong>所属栏目：</strong>
            <select name="sectionid" class="foodsectionid">
                <option value="0">---请选择所属栏目---</option>
                        <volist name="sectiondata" id="vo">
                            <eq name="vo.id" value="$Think.get.sid">
                                    <option value="<{$vo.id}>" selected="selected"><{$vo.name}></option>
                                <else/>
                                    <option value="<{$vo.id}>"><{$vo.name}></option>
                            </eq>
                        </volist>
            </select>　

            <strong>所属分类：</strong>
            <select name="categoryid" class="foodcategoryid">
                <option value="0">---请选择所属分类---</option>
                <volist name="categorydata" id="vo">
                    <eq name="vo.id" value="$Think.get.cid">
                        <option value="<{$vo.id}>" selected="selected"><{$vo.name}></option>
                        <else/>
                        <option value="<{$vo.id}>"><{$vo.name}></option>
                    </eq>
                </volist>
            </select>　

            <strong>目标食材：</strong>
            <select name="articleid" class="foodarticleid">
                <option value="0">---请选择所属食材---</option>
                <volist name="articledata" id="vo">
                    <eq name="vo.id" value="$Think.get.id">
                        <option value="<{$vo.id}>" selected="selected"><{$vo.name}></option>
                        <else/>
                        <option value="<{$vo.id}>"><{$vo.name}></option>
                    </eq>
                </volist>
            </select>　
            <a style="float:right;" href="javascript:;" class="adds">添加搭配</a>
        </div>





        <div class="content">

                <volist name="list" id="vo">
                    <input type="hidden" name="id[]" value="<{$vo.id}>" />
                    <table class="dest">

                        <tr>
                            <td rowspan="2" style="width:70px;" class="img"><img class="orgimg" src="__PUBLIC__/Content/FoodArticle/thumb_<{$orgname}>" /></td>
                            <td rowspan="2">+</td>

                            <td rowspan="2" style="width:70px;" class="imgs" ><img alt="destimg" class="destimg" src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.destarticle.image}>" /></td>

                            <td rowspan="2">&nbsp;</td>
                            <td>所属栏目：</td>
                            <td>
                                <select name="destsectionid[]">
                                    <option value="0">---请选择所属栏目---</option>
                                    <volist name="sectiondata" id="destsection">
                                        <eq name="destsection.id" value="$vo.destsectionid">
                                            <option value="<{$destsection.id}>" selected="selected"><{$destsection.name}></option>
                                            <else/>
                                            <option value="<{$destsection.id}>"><{$destsection.name}></option>
                                        </eq>
                                    </volist>
                                </select>
                            </td>
                            <td>所属分类：</td>
                            <td>
                                <select name="destcategoryid[]">
                                    <option value="0">---请选择所属分类---</option>
                                    <option value="<{$vo.destcategoryid}>" selected="selected"><{$vo.destcategoryname}></option>
                                </select>
                            </td>
                            <td>目标食材：</td>
                            <td>
                                <select name="destarticleid[]">
                                    <option value="0" selected="selected">---请选择搭配食材---</option>
                                    <option value="<{$vo.destarticleid}>" selected="selected"><{$vo.destarticle.name}></option>
                                </select>　
                                <a style="float:right;" href="javascript:;" class="remove">删除</a>
                            </td>
                        </tr>

                        <tr>
                            <td>搭配宜忌：</td>
                            <td>
                                <select name="goodorbad[]" class="collocaltion">

                                        <switch name="vo.goodorbad" >
                                            <case value="1">
                                                <option value="0">---请选择搭配宜忌---</option>
                                                <option value="1" selected="selected">宜</option>
                                                <option value="2">忌</option>
                                            </case>
                                            <case value="2">
                                                <option value="0">---请选择搭配宜忌---</option>
                                                <option value="1">宜</option>
                                                <option value="2" selected="selected">忌</option>
                                            </case>
                                            <default />
                                            <option value="0" selected="selected">---请选择搭配宜忌---</option>
                                            <option value="1">宜</option>
                                            <option value="2">忌</option>
                                        </switch>

                                </select>
                            </td>
                            <td>搭配描述：</td>
                            <td colspan="3">
                                <input type="text" style="width:99%" name="description[]" value="<{$vo.description}>" />
                            </td>
                        </tr>


                    </table>

                </volist>

            </div>

        <div class="buttom">
            <input type="submit" class="submit" value="修改搭配" />
        </div>

    </form>


        <div class="adddest" style="display:none;">
            <table class="dest">
                <tr>
                    <td rowspan="2" style="width:70px;" class="img"><img class="orgimg" src="__PUBLIC__/Content/FoodArticle/thumb_<{$orgname}>" /></td>
                    <td rowspan="2">+</td>
                    <td rowspan="2" style="width:70px;" class="imgs" ><img alt="destimg" class="destimg" src="__PUBLIC__/Content/FoodCollocation/destimg.jpg" /></td>
                    <td rowspan="2">&nbsp;</td>
                    <td>所属栏目：</td>
                    <td>
                        <select name="destsectionid[]">
                            <option value="0" selected="selected">---请选择所属栏目---</option>
                            <volist name="sectiondata" id="destsection">
                                    <option value="<{$destsection.id}>"><{$destsection.name}></option>
                            </volist>
                        </select>
                    </td>
                    <td>所属分类：</td>
                    <td>
                        <select name="destcategoryid[]">
                            <option value="0" selected="selected">---请选择所属分类---</option>
                        </select>
                    </td>
                    <td>目标食材：</td>
                    <td>
                        <select name="destarticleid[]">
                            <option value="0" selected="selected">---请选择搭配食材---</option>
                        </select>　

                        <a style="float:right;" href="javascript:;" class="remove">删除</a>

                    </td>
                </tr>
                <tr>

                    <td>搭配宜忌：</td>
                    <td>
                        <select name="goodorbad[]" class="collocaltion">
                            <option value="0" selected="selected">---请选择搭配宜忌---</option>
                            <option value="1">宜</option>
                            <option value="2">忌</option>
                        </select>
                    </td>
                    <td>搭配描述：</td>
                    <td colspan="3">
                        <input type="text" style="width:99%" name="description[]" />
                    </td>
                </tr>
            </table>
        </div>



</div>

<script type="text/javascript" src="../Public/js/foodcollocation.js"></script>